#!/usr/bin/python
# -*- coding: utf-8 -*-

from flask_restful import Resource
from flask         import redirect,request,make_response

from e4ting.util.hardware import Statistics

class WebStatis(Resource):
    ''' 业务性能统计 '''
    #----------------------------------------------------------------------
    def __init__(self):
        super(WebStatis, self).__init__()

    def get(self, **kwargs):
        objs = Statistics.loads_all()
        data = [ _.json() for _ in objs]
        return dict(code=200, data=data)


